<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 5.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<!--common-->
  <link href="${pageContext.request.contextPath }/admin/css/style.css" rel="stylesheet">
  <link href="${pageContext.request.contextPath }/admin/css/style-responsive.css" rel="stylesheet">
  <link href="${pageContext.request.contextPath }/admin/css/stuInfoManage/main.css" rel="stylesheet">
  <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath }/admin/css/showBo.css" />
<title>富金银行后台首页</title>
<script src="js/jquery-1.10.2.min.js"></script>
  <script type="text/javascript">
	  $(document).ready(function() {
		  $("#file").change( function (){
			validateUploadImg($(this)[0]);
		  })})
  
        //验证上传图片的格式和大小
        function validateUploadImg(file) {
		  console.log(file);
	        var filepath = file.value;
	        var extStart = filepath.lastIndexOf(".");
	        //得到文件后缀
	        var ext = filepath.substring(extStart, filepath.length).toUpperCase();
	        console.log(ext);
	        if (ext != ".PNG" && ext != ".GIF" && ext != ".JPEG" && ext != ".JPG") {
	        	alert("图片限png,gif,jpeg,jpg格式");
	        	file.value = '';
	            return false;
	        }
	        var file_size = 0;
	      	//上传文件的大小
	        file_size = file.files[0].size; 
	      	console.log(file.files[0]);
	        var size = file_size / 1024;
	        if (size > 10240) {
	            alert("上传的图片大小不能超过10M！");
	            file.value = '';
	            return false;
	        } 
	        return true;
      	 }
    </script>
</head>
<body class="sticky-header">
<section>
	<!-- 导入左边菜单栏 -->
    <%@include file="common/sidebarStart.jsp" %>
    		<li class="menu-list nav-active"><a href="#"><i class="fa fa-book"></i> <span>用户信息管理</span></a>
               <ul class="sub-menu-list">
                   <li><a href="${pageContext.request.contextPath }/page.do?url=admin/userInfoSelect"> 用户信息查询</a></li>
                   <li class="active"><a href="${pageContext.request.contextPath }/page.do?url=admin/verify"> 用户信息审核</a></li>
               </ul>
           </li>

           <li class="menu-list"><a href="#"><i class="fa fa-th-list"></i> <span>发布公告</span></a>
               <ul class="sub-menu-list">
                   <li><a href="${pageContext.request.contextPath }/page.do?url=admin/sendNotice"> 网站发布公告 </a></li>
               </ul>
           </li>
     <%@include file="common/sidebarEnd.jsp" %>
    <!-- 主内容开始-->
	<div class="main-content" >	
		<!-- 通知菜单栏 -->
		<%@include file="common/notifyMenu.jsp" %>
		<div class="container">
        <div class="row">
        <div class="stuInfo">
        <form action="uploadAdminPhoto" enctype="multipart/form-data" method="post">
		   <table class="table table-bordered table-hover">
		     <tbody class="stuInfo2">
		          <tr class="success">
                    <td width="10%">用户角色：</td>
                    <td colspan="2">admin</td>
				  </tr>
				  <tr class="info">
                    <td>用户姓名：</td>
                    <td colspan="2">${admin.aName}</td>
				  </tr>
				  <tr class="warning" >
                    <td>用户ip：</td>
                    <td colspan="2">127.0.0.1</td>
				  </tr>
				  <tr class="danger">
                    <td>上传头像：</td><!-- accept="image/gif, image/jpeg" -->
                    <td width="20%"><input type="file" name="file" id="file2"  required="required"/></td>
                    <td><input type="submit" value="上传"/></td>
				  </tr>
		      </tbody>
		    </table>
		  </form>
		  <!-- 提示框 -->
		  <c:if test="${not empty msg }">
			  <script type="text/javascript">
				  window.onload=function(){
					 Showbo.Msg.alert('${msg }');
				  }
			  </script>
		  </c:if>
		    </div>
		    <div class="col-md-1"></div>
		    </div>
		  </div>
    </div>
    <!-- 主内容结束-->
</section>

<!-- Placed js at the end of the document so the pages load faster -->

<script src="${pageContext.request.contextPath }/admin/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="${pageContext.request.contextPath }/admin/js/jquery-migrate-1.2.1.min.js"></script>
<script src="${pageContext.request.contextPath }/admin/js/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath }/admin/js/modernizr.min.js"></script>
<script src="${pageContext.request.contextPath }/admin/js/jquery.nicescroll.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/js/showBo.js"></script>

<!--页面公共脚步-->
<script src="${pageContext.request.contextPath }/admin/js/scripts.js"></script>

</body>
</html>